import service from "@/api/index.js";
import qs from 'qs';

const adminApi={
    //获取验证码
    captcha(){
        return service.get("/admin/captcha");
    },//登录
    login(admin){
        return service.post("/admin/login",qs.stringify(admin));
    },
    getInfo(){
        return service.get("/admin/info");
    },
    chgPwd(chgPwdObj){
        return service.put("/admin/chgPwd",qs.stringify(chgPwdObj));
    },
    chgInfo(admin) {
        return service.put("/admin/chgInfo",admin)
    }, selectAll(status) {
        return service.get("/admin/selectAll", {params: {status: status}})
    }, delete(id) {
        return service.delete(`/admin/${id}`)
    }, insert(admin) {
        return service.post('/admin/insert', admin)
    }, reset(id) {
        return service.put(`/admin/reset/${id}`)
    }
};
export default adminApi;



